<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<jsp:useBean id="now" class="java.util.Date" /> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>	
<script type="text/javascript" src="<%=basePath %>/login/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<%=basePath %>/login/scripts/jquery.quickpaginate.js"></script>
<script type="text/javascript">
	$(function(){
		$("#dataTable tbody tr").quickpaginate({ perpage: 10, pager : $("#temp") });
	});
	function order(fieldname){
		$("#orderBy").val(fieldname);
		$("form:first").submit(); 
	}
</script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>/login/css/style.css" />
<style type="text/css">
th{
	color:#375B91;
}
</style>
<div id="content2">
		<div id="box2">
			<div>
				<h3>
					当前位置&nbsp;:&nbsp;自动站数据监测&nbsp;>>&nbsp;历史数据查询&nbsp;>>&nbsp;相对湿度查询报表
				</h3>
			</div>
			<div id="search_bar2">
			<form action="zdzReportAction!reportHumidity.action" method="post">
			<table width="420" border="0" cellpadding="0" cellspacing="3">
					<tr>
						<td width="40">
							日期:
						</td>
						<td width="80">
						<input name="date" onfocus="calendar()" value="${date}"/>
						</td>
						<td width="40">
							时:
						</td>
						<td width="80">
						<s:select name="hour" list="#{'1':'1时','2':'2时','3':'3时','4':'4时','5':'5时','6':'6时','7':'7时','8':'8时','9':'9时','10':'10时','11':'11时','12':'12时','13':'13时','14':'14时','15':'15时','16':'16时','17':'17时','18':'18时','19':'19时','20':'20时','21':'21时','22':'22时','23':'23时','24':'24时'}"  theme="simple"></s:select>
						</td>
						<td width="40">
							分:
						</td>
						<td width="80">
						<s:select name="minute" list="#{'0':'0分','5':'5分','10':'10分','15':'15分','20':'20分','25':'25分','30':'30分','35':'35分','40':'40分','45':'45分','50':'50分','55':'55分'}"  theme="simple"></s:select>
						</td>
						<td>
							<input id="orderBy" type="hidden" name="orderByBean.orderByFile" value="${orderByBean.orderByFile}"/>
							<input type="hidden" name="orderByBean.orderByMethod" value="${orderByBean.orderByMethod}"/>
							<input type="submit" value="查询" />
							<input type ="button" value="最新" onclick="javascript:location.reload()"/>
						</td>
					</tr>
				</table>
				<input type="button" value="上一条记录相对湿度" onclick="javascript:location.href='zdzReportAction!reportHumidityPrev.action?date=${date }&hour=${hour}&minute=${minute}'"/>
				<input type="button" value="下一条记录相对湿度" onclick="javascript:location.href='zdzReportAction!reportHumidityNext.action?date=${date }&hour=${hour}&minute=${minute}'" />
				</form>
	    </div>
	    <div style="color: blue;font-weight: bold;font-size: 18px;">${reportTitle }</div>
	    
			<table id="dataTable">
				<thead>
					<tr>
						<th colspan="2">自动站点</th>
						<th rowspan="2"><a href="javascript:order('rh')" class="order">正点相对湿度</a></th>
						<th colspan="2">日最大相对湿度</th>
						<th colspan="2">日最小相对湿度</th>
					</tr>
					<tr>
						<th><a href="javascript:order('id')" class="order">代号</a></th>
						<th>站名</th>
						<th><a href="javascript:order('maxrh')" class="order">相对湿度</a></th>
						<th>出现时间</th>
						<th><a href="javascript:order('minrh')" class="order">相对湿度</a></th>
						<th>出现时间</th>
					</tr>
				</thead>
				<tbody>
				<tr><td colspan="17" align="center"><c:if test="${empty zdzList}">暂无数据</c:if></td></tr>
				<c:forEach items="${zdzList}" var="report">
					<tr>
						<td class="a-center">${report.id}</td>
						<td class="a-center">${report.zdzName }</td>
						<td class="a-center">${report.rh }</td>
						<td class="a-center">${report.maxrh}</td>
						<td class="a-center"><fmt:formatDate value="${report.maxrhtime}" pattern="yyyy-MM-dd HH:mm"/></td>
						<td class="a-center">${report.minrh }</td>
						<td class="a-center"><fmt:formatDate value="${report.minrhtime}" pattern="yyyy-MM-dd HH:mm"/></td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
			<div id="temp" style="height: 30px;padding-left:500px;"></div>
			<jsp:include page="flash_zdz.jsp"></jsp:include>
			</div>
		<br />
	</div>
